
<template name='cz_record'>
	<view @click.stop >
		
		<uni-popup ref="chongzhang_order" type="center" title="修正记录" style="">
			<view class="sbox box-infos">
				<!-- 列表区 -->
				<view class="content-box " >
					<view class="boxsss40" >
						<table id="record-goods" v-if="resData.list &&  resData.list.length>0">
							<!-- 表头 -->
							<thead>
								<tr >
									<th  class="centers " style="min-width: 20px;">
										序
									</th>
									<th  class="centers ">
										时间
									</th>
									<th  class=" " @click="$common.changeColumnColor('record-goods',0)">
										余额
									</th>
									<th  class=" " @click="$common.changeColumnColor('record-goods',1)">
										金额
									</th>
									<th  class=" " @click="$common.changeColumnColor('record-goods',2)">
										结余
									</th>
									<th  class=" " @click="$common.changeColumnColor('record-goods',3)">
										操作者
									</th>
									<th  class=" ">
										备注
									</th>
								</tr>
							</thead>
							<tbody>
								<!-- 内容 -->
								<tr @click="TabcheckedIndex=index,orderOnClick(item)" 
								:key="index"
								v-for="(item,index) in resData.list" 
								:class="TabcheckedIndex == index ? 'goods-list-select':''"
								:style="(item.status==1||item.status==6) ?'color: #e40318;':''"
								>
									<td  class="centers ">
										{{index+1}}
									</td>
									<td  >
										<view class="centers  font12 relative flex">
											<view>{{item.time}}</view>
										</view>
									</td>
									<td   class="col-0">
										￥{{item.money_start}}
									</td>
									<td   class="weight col-1" >
										￥{{item.money}}
									</td>
									<td   class="weight col-2">
										￥{{item.money_end}}
									</td>
									<td  class="col-3">
										{{item.uid_name}}
									</td>
									<td  class="centers alter">
										{{item.descr}}
									</td>
								</tr>
							</tbody>
						</table>
						<!-- 暂无数据 -->
						<empty v-if="resData.list &&  resData.list.length==0"></empty>
						<!-- end -->
					</view>
				</view>
				<!-- end -->
			</view>
		</uni-popup>
	</view>
	
</template>

<script>
	import pages from "@/components/admin-components/pages.vue"
	import empty from "@/components/admin-components/empty.vue"
	export default{
		name:'cz_record',
		components: {
			empty,
			pages,
		},
		data(){
			return{
				TabcheckedIndex:-1,//当前选中项
				resData:{
					list:[]
				},
				OnOrderId:''
			}
		},
		 
		created() {
		},
		methods:{
			open(id){
				this.OnOrderId = id
				this.$refs.chongzhang_order.open()
				this.onload()
			},
			/**
			 * 获取列表
			*/
			onload(){
				var that = this
				that.$common.get_request(
					{
						type:'GetOrderMoneyRecord',
						id: that.OnOrderId,
					},
					(res)=>{
						that.resData = res
					}
				);
			},
		
		}
	}
</script>

<style>
</style>
